<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
<head>
<script type="text/javascript" src="scripts/boot.js"></script>
</head>
<body>
<div class="mini-toolbar" style="border-bottom:0;padding:0px;">
    <table style="width:100%;">
        <tr>
            <td style="width:100%;">
                <span style="margin-left:10px;">用户名称(模糊)：</span><input id="s_name" class="mini-textbox" emptyText="用户名称(模糊)" style="width:150px;margin-right:10px;" />
            </td>
            <td style="white-space:nowrap;">
               	<a class="mini-button" onclick="search()">查询</a>
           	</td>
        </tr>
    </table>           
</div>
<div id="datagrid1" class="mini-datagrid " idField="id" pageSize="20"
	url="choice_user_list_view.do" style="width:100%;height:85%;" multiSelect="true">
	<div property="columns">
		<div type="indexcolumn" headerAlign="center">#</div>
		<div field="username" width="80" headerAlign="center" align="center">登录名</div>
		<div field="name" width="100" headerAlign="center" align="center">姓名</div>
		<div field="deptName" width="120" headerAlign="center" align="center">部门</div>
		<div field="groupName" width="100" headerAlign="center" align="center">组</div>
		<div field="createTime" width="140" dateFormat="yyyy-MM-dd HH:mm:ss" headerAlign="center" align="center">注册时间</div>
	</div>
</div>
<div class="mini-toolbar" style="text-align: center;border: 0px;">            
    <a class="mini-button" onclick="onOk" style="width:60px;margin-right:50px;">确定</a>       
    <a class="mini-button" onclick="onCancel" style="width:60px;">取消</a>       
</div>
<script type="text/javascript">
	mini.parse();
	var grid = mini.get("datagrid1");
	grid.load();
	//查询
	function search() {
	    var name = mini.get("s_name").getValue();
	    grid.load({ name: name });
	}
	
    function GetData() {
        var row = grid.getSelected();
        return row;
    }
    
    function onKeyEnter(e) {
        search();
    }
    function onRowDblClick(e) {
        onOk();
    }
    //////////////////////////////////
    function CloseWindow(action) {
        if (window.CloseOwnerWindow) return window.CloseOwnerWindow(action);
        else window.close();
    }

    function onOk() {
        CloseWindow("ok");
    }
    
    function onCancel() {
        CloseWindow("cancel");
    }

</script>
</body>
</html>